<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of vInstall
 *
 * @author prezes
 */
class vInstall extends vView{
   
    protected function loadHead(){
        //TODO: Ładowanie nagłówka z pliku
        echo "<HTML><BODY>";
    }
    protected function loadTail(){
        //TODO: Ładowanie stopki z pliku
        echo "</BODY></HTML>";
    }
    protected function showError(){
        //TODO: Error box
        
        if(isset($this->model->error)){
            $this->model->error = array_filter($this->model->error); // wywalanie wartosci pustych
            foreach( $this->model->error as $error){
                echo $error . "<br>";
            }
        }
        
    }
    
    protected function showMessage() {
        //TODO: Message box
        
        if(isset($this->model->message)){
            $this->model->message = array_filter($this->model->message); // wywalanie wartosci pustych
            foreach( $this->model->message as $message){
                echo $message . "<br>";
            }
        }
    }
    
    
    public function show(){
        $this->loadHead();
        
        $this->showError();
        
        $this->showMessage();
        
        echo $this->model->string;
        
        
        $this->loadTail();
    }

    

}
